<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>英腾教育</title>
	<link rel="icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" href="/css/account/cover.css" media="screen" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" />

</head>
<body onload="init()">
<script src="/js/common/ajax.js" type="text/javascript"></script>
<script src="/js/common/yingSoftPrg.js" type="text/javascript"></script>
<script src="/js/common/yingSoftCookie.js" type="text/javascript"></script>
<script src="/js/common/storage.js" type="text/javascript"></script>
<script type="text/javascript">
	/********************************************************************************
	功能：通过User Agent判断是PC浏览器还是手机浏览器
	输入参数：无
	返回值：设备标识 web_android/web_iphone/web_pc/web_winphone
	最后修改人：黎萍（2015-02-06）
	修改记录：增加对winphone手机自带浏览器的控制
	*******************************************************************************/
	var browser={
		versions:function(){
			var u = navigator.userAgent, app = navigator.appVersion;
			return {
				trident: u.indexOf('Trident') > -1, //IE内核
				presto: u.indexOf('Presto') > -1, //opera内核
				webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
				gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
				mobile: !!u.match(/AppleWebKit.*Mobile.*/)||!!u.match(/AppleWebKit/), //是否为移动终端
				ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
				android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
				iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
				iPad: u.indexOf('iPad') > -1, //是否iPad
				webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
			};
		}()
	};
	function init_phone() {
		//接收版本信息（app访问或者web访问）
		var clientType = G_Prg.getQueryString('clientType');
		var androidVersion = G_Prg.getQueryString('androidVersion');
		var iosVersion = G_Prg.getQueryString('iosVersion');

		if(G_Storage.checkSessionStorageSupport()){
			if(clientType){
				G_Storage.setSessionStorageValue('clientType',clientType);
			}
			if(androidVersion){
				G_Storage.setSessionStorageValue('androidVersion',androidVersion);
			}
			if(iosVersion){
				G_Storage.setSessionStorageValue('iosVersion',iosVersion);
			}
		}
		setTimeout(function () {
			//判断用户是否登录是否选择科目
			if (G_Cookie.getUserID() && G_Cookie.getGuid() && G_Cookie.getUserName()) {//已登录
				if (!G_Cookie.getAppName()) {//未选科目
					window.location.href = '/switchMenu';
					return;
				}
				window.location.href = '/doExam-index';//已选科目
				return;
			}
			console.log(G_Prg.getCookie('first'));
			if(G_Prg.getCookie('first')){
				window.location.href = '/doExam-index';
			}else{
				window.location.href = '/experience';
			}
		}, 100);
	}
	function init(){
		if(browser.versions.ios || browser.versions.android || browser.versions.iPhone || browser.versions.iPad){// || browser.versions.webApp){
			//window.location.href ='html/default.html';
			init_phone();
		}else{
			//控制PC版的浏览地址
			window.location.href ='http://wide.ksbao.com';
		}
	}

</script>
</body>
</html>